package com.wfcm.dao;

import com.wfcm.entity.WfCollageOrderEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author xlf
 * @email xlfbe696@gmail.com
 * @date 2018-09-11 11:24:33
 */
public interface WfCollageOrderDao extends BaseDao<WfCollageOrderEntity> {
    public List<WfCollageOrderEntity> queryRandomList(Map<String, Object> map);

    public int queryRandomTotal(Map<String, Object> map);

    public List<WfCollageOrderEntity> queryRandomLeader(Map<String, Object> map);

    public List<WfCollageOrderEntity> queryByOrderCode(String orderCode);

    public List<WfCollageOrderEntity> queryListByToUserId(String toUserId);

    public List<WfCollageOrderEntity> queryListByUserId(String userId);

    public WfCollageOrderEntity queryMyCollage(Map<String, Object> map);

    public WfCollageOrderEntity queryCollaging(Map<String, Object> map);

    public WfCollageOrderEntity queryLeaderCollage(Map<String, Object> map);

    public WfCollageOrderEntity queryLeaderCollaging(Map<String, Object> map);

    public List<WfCollageOrderEntity> queryPartners(Map<String, Object> map);

    public List<WfCollageOrderEntity> queryNotSuccess(Map<String, Object> map);

    public List<WfCollageOrderEntity> queryIsCollage(Map<String, Object> map);

    WfCollageOrderEntity queryGroupBuying(@Param("toUserId") Integer toUserId, @Param("activityId") Integer activityId,
                                          @Param("status") Integer status);

    List<WfCollageOrderEntity> queryGroupBuyList(@Param("collageOrder") String collageOrder);

    List<WfCollageOrderEntity> record(@Param("userId") Integer userId, @Param("start") Integer start, @Param("end") Integer end);

    Integer recordTotal(@Param("userId") Integer userId);

    List<String> queryHeadImgs(@Param("activityId") Integer activityId);

    List<WfCollageOrderEntity> queryRandomGroupBuyList(@Param("activityId") Integer activityId
            , @Param("start") Integer start, @Param("end") Integer end);

    Integer queryRandomGroupBuyTotal(@Param("activityId") Integer activityId);

}
